<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	template="/WEB-INF/templates/default.xhtml">
	<ui:define name="content">
		<p:ajaxStatus onstart="statusDialog.show();"
			onsuccess="statusDialog.hide();" />
		<p:dialog modal="true" widgetVar="statusDialog" header="Status"
			draggable="false" closable="false">
			<p:graphicImage value="resource/gfx/ajaxloader.gif" />
		</p:dialog>
		<p:growl id="messages" autoUpdate="true" />
		<p:layout style="min-width:400px;min-height:600px;" id="layout">
			<p:layoutUnit position="north" id="top" size="50">

			</p:layoutUnit>
			<p:layoutUnit position="west" id="left" resizable="true"
				collapsible="true" header="Menu">
				<h:form>
					<p:panelGrid columns="1">
						<p:commandButton value="info" type="button" onclick="lazyloadInfo()"
						id="btnLoadInfo" />
					<p:commandButton value="gestion" type="button" onclick="lazyloadUserGestion()"
						id="btnLoadUserGestion" />
					</p:panelGrid>
				</h:form>
			</p:layoutUnit>
			<p:layoutUnit position="center" id="center">
				<h:form id="dialog1">
					<p:outputPanel id="lazypanel" >
					<ui:include src="#{desktopMBean.page}" />
					</p:outputPanel>

					<p:remoteCommand name="lazyloadUserGestion" update="lazypanel" actionListener="#{desktopMBean.showUsersGestion}" oncomplete="userGestion.show()">
					</p:remoteCommand>
					<p:remoteCommand name="lazyloadInfo" update="lazypanel" actionListener="#{desktopMBean.showInfo}" oncomplete="info.show()">
					</p:remoteCommand>

				</h:form>
				
			</p:layoutUnit>
		</p:layout>

	</ui:define>
</ui:composition>
